class MassdriverBeamEffect extends ShockBeamEffect;

simulated function SpawnImpactEffects(rotator HitRot, vector EffectLoc)
{
      PlaySound (Sound'WeaponSounds.BExplosion1',,3*TransientSoundVolume);
      //PlaySound (Sound'WeaponSounds.ShockRifle.ShockComboFire',,4*TransientSoundVolume);

	Spawn(class'ArkonRLExplosionCrap',,, EffectLoc, HitRot);
	Spawn(class'ONSPlasmaHitBlue',,, EffectLoc, HitRot);
	Spawn(class'FlakExplosion',,, EffectLoc, HitRot);
//	Spawn(class'RocketSmokeRing',,, EffectLoc, Rotator(-HitNormal));

	Spawn(class'RocketMark',self,,EffectLoc, Rotator(-HitNormal));
}

simulated function SpawnEffects()
{
    local MassDriverBeamCoil Coil;
    local xWeaponAttachment Attachment;

    if (Instigator != None)
    {
        if ( Instigator.IsFirstPerson() )
        {
			if ( (Instigator.Weapon != None) && (Instigator.Weapon.Instigator == Instigator) )
				SetLocation(Instigator.Weapon.GetEffectStart());
			else
				SetLocation(Instigator.Location);

//            Spawn(MuzFlashClass,,, Location);
        }
        else
        {
            Attachment = xPawn(Instigator).WeaponAttachment;
            if (Attachment != None && (Level.TimeSeconds - Attachment.LastRenderTime) < 1)
                SetLocation(Attachment.GetTipLocation());
            else
                SetLocation(Instigator.Location + Instigator.EyeHeight*Vect(0,0,1) + Normal(mSpawnVecA - Instigator.Location) * 25.0); 
//            Spawn(MuzFlash3Class);
        }
    }

    if ( EffectIsRelevant(mSpawnVecA + HitNormal*2,false) && (HitNormal != Vect(0,0,0)) )
		SpawnImpactEffects(Rotator(HitNormal),mSpawnVecA + HitNormal*2);

	    Coil = Spawn(class'MassDriverBeamCoil',,, Location, Rotation);
	    if (Coil != None)
		    Coil.mSpawnVecA = mSpawnVecA;
}

defaultproperties
{
     MuzFlashClass=None
     MuzFlash3Class=None
     mLifeRange(0)=1.500000
     mSizeRange(0)=40.000000
     mSizeRange(1)=40.000000
     mColorRange(0)=(B=180,G=30,R=30,A=200)
     mColorRange(1)=(B=220,G=45,R=45,A=220)
     LifeSpan=1.000000
}
